var titles = [
    "我的整个朋友圈都在玩，都停不下来了！",
    "这么简单的游戏，你能排第几？",
    "给大家分享个好玩的游戏、魔性太高根本停不下来。",
    "小哥哥小姐姐最喜爱的游戏，撩你心动！",
    "考验世界级的反应，看你能排多少名？"
];

//监听微信系统转发  防止未处理
if(Config.channelID == 1){
    var len = titles.length;
    var _title =  titles[Math.floor(Math.random() * len)];
    var index = Math.random() > 0.5 ? 1 : 0;
    var icon = index + 1;
    wx.onShareAppMessage(function () {
       return {
           title:_title,
		   imageUrl: Config.downUrl + "wxshare/" + icon + ".jpg",
       }
    });
}

var WxApp = {
    //分享
    onShare:function(shareContent){
        var _title = "";
        if(shareContent){
            _title = shareContent;
        }else{
            var len = titles.length;
            _title = titles[Math.floor(Math.random() * len)];
        }
          
        var index = Math.random() > 0.5 ? 1 : 0;
        var icon = index + 1;
        wx.shareAppMessage({
            title:_title,
            imageUrl: Config.downUrl + "wxshare/" + icon + ".jpg",
        });
    },
};